Budget Item List
this contains a list of budget items associated with a budget and is used to perform calculations and interactions with the items of the list without having to query the main data model for every budget-specific interaction.
This can also be used to create an editable copy of a budget so that changes can be aborted or committed rather than synced individually.
Properties
Functions
Return the actual amount for a specific category in a month. Because of a bug in the Calendar class, date is not reset to the first day of the month so it must be passed in already set correctly.
Returns the actual amount for all categories in the given period. Optimised for performance using a one-pass sweep.
Return the budgeted amount for a specific category in a month. Because of a bug in the Calendar class, date is not reset to the first day of the month so it must be passed in already set correctly.
Returns the budgeted amount for all categories in the given period
Get the budget items for the given account in the given budget period.
Get the budget items with the given transfer account whose date interval overlap with the given date range.
Get the budget item at the given position in the list
Return the position in the item list of the given item
Precompute and cache actual amounts for the given date ranges. Safe to call from a background thread — later reads on the EDT become instant lookups.
Remove the given budget item from the list. Returns true if the item was in the list.
Sets the budgeted amount for a given Account in a given BudgetPeriod.
Get a new array of the budget items contained in this list